﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Server.Models;
using Server.CompanyService;

namespace Server.CompanyManage
{
    public class CompanyBLL
    {
        CompanyDAL cDal = new CompanyDAL();
        #region 公司
        public void CompanyAdd(ManagerCompany company)
        {
            try
            {
                cDal.CompanyAdd(company);
            }
            catch (Exception)
            {
                throw;
            }
        }

        public void CompanyEdit(ManagerCompany company)
        {
            try
            {
                cDal.CompanyEdit(company);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void CompanyDel(int id)
        {
            try
            {
                cDal.CompanyDel(id);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public ManagerCompany[] GetCompanyList()
        {
            try
            {
                return cDal.GetCompanyList();
            }
            catch (Exception)
            {
                throw;
            }
        }
        public ManagerCompany GetCompanyByName(string name)
        {
            try
            {
                return cDal.GetCompanyByName(name);
            }
            catch (Exception)
            {
                throw;
            }
        }
        #endregion
        #region 地区
        public void ProvinceAdd(AreaProvinceModel province)
        {
            try
            {
                cDal.ProvinceAdd(province);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void ProvinceEdit(AreaProvinceModel Province)
        {
            try
            {
                cDal.ProvinceEdit(Province);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void ProvinceDel(int id)
        {
            try
            {
                cDal.ProvinceDel(id);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public AreaProvinceModel[] GetProvinceList()
        {
            try
            {
                return cDal.GetProvinceList();
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void CityAdd(AreaCityModel City)
        {
            try
            {
                cDal.CityAdd(City);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void CityEdit(AreaCityModel City)
        {
            try
            {
                cDal.CityEdit(City);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void CityDel(int id)
        {
            try
            {
                cDal.CityDel(id);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public AreaCityModel[] GetCityList(int pId)
        {
            try
            {
                return cDal.GetCityList(pId);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void DistrictAdd(AreaDistrictModel District)
        {
            try
            {
                cDal.DistrictAdd(District);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void DistrictEdit(AreaDistrictModel District)
        {
            try
            {
                cDal.DistrictEdit(District);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void DistrictDel(int id)
        {
            try
            {
                cDal.DistrictDel(id);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public AreaDistrictModel[] GetDistrictList(int cId)
        {
            try
            {
                return cDal.GetDistrictList(cId);
            }
            catch (Exception)
            {
                throw;
            }
        }
        #endregion
        #region 机关
        public void SBProvinceAdd(SBProvinceModel SBProvince)
        {
            try
            {
                cDal.SBProvinceAdd(SBProvince);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void SBProvinceEdit(SBProvinceModel SBProvince)
        {
            try
            {
                cDal.SBProvinceEdit(SBProvince);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void SBProvinceDel(int id)
        {
            try
            {
                cDal.SBProvinceDel(id);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public SBProvinceModel[] GetSBProvinceList()
        {
            try
            {
                return cDal.GetSBProvinceList();
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void SBCityAdd(SBCityModel SBCity)
        {
            try
            {
                cDal.SBCityAdd(SBCity);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void SBCityEdit(SBCityModel SBCity)
        {
            try
            {
                cDal.SBCityEdit(SBCity);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void SBCityDel(int id)
        {
            try
            {
                cDal.SBCityDel(id);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public SBCityModel[] GetSBCityList(int pId)
        {
            try
            {
                return cDal.GetSBCityList(pId);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void SBDistrictAdd(SBDistrictModel SBDistrict)
        {
            try
            {
                cDal.SBDistrictAdd(SBDistrict);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void SBDistrictEdit(SBDistrictModel SBDistrict)
        {
            try
            {
                cDal.SBDistrictEdit(SBDistrict);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void SBDistrictDel(int id)
        {
            try
            {
                cDal.SBDistrictDel(id);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public SBDistrictModel[] GetSBDistrictList(int cId)
        {
            try
            {
                return GetSBDistrictList(cId);
            }
            catch (Exception)
            {
                throw;
            }
        }
        #endregion
        #region 行业
        public void TradeBigAdd(TradeBigModel TradeBig)
        {
            try
            {
                cDal.TradeBigAdd(TradeBig);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void TradeBigEdit(TradeBigModel TradeBig)
        {
            try
            {
                cDal.TradeBigEdit(TradeBig);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void TradeBigDel(int id)
        {
            try
            {
                cDal.TradeBigDel(id);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public TradeBigModel[] GetTradeBigList()
        {
            try
            {
                return cDal.GetTradeBigList();
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void TradeMidAdd(TradeMidModel TradeMid)
        {
            try
            {
                cDal.TradeMidAdd(TradeMid);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void TradeMidEdit(TradeMidModel TradeMid)
        {
            try
            {
                cDal.TradeMidEdit(TradeMid);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void TradeMidDel(int id)
        {
            try
            {
                cDal.TradeMidDel(id);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public TradeMidModel[] GetTradeMidList(int bId)
        {
            try
            {
                return cDal.GetTradeMidList(bId);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void TradeSmallAdd(TradeSmallModel TradeSmall)
        {
            try
            {
                cDal.TradeSmallAdd(TradeSmall);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void TradeSmallEdit(TradeSmallModel TradeSmall)
        {
            try
            {
                cDal.TradeSmallEdit(TradeSmall);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public void TradeSmallDel(int id)
        {
            try
            {
                cDal.TradeSmallDel(id);
            }
            catch (Exception)
            {
                throw;
            }
        }
        public TradeSmallModel[] GetTradeSmallList(int mId)
        {
            try
            {
                return cDal.GetTradeSmallList(mId);
            }
            catch (Exception)
            {
                throw;
            }
        }
        #endregion
    }
}
